package com.class05.service.impl;

import com.class05.dao.StudentDao;
import com.class05.dao.impl.StudentDaoImpl;
import com.class05.pojo.Student;
import com.class05.service.StudentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2023/10/30 20:15
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;

    @Override
    public List<Student> findAll() {
        List<Student> studentList = studentDao.queryAll();
        Logger logger = LoggerFactory.getLogger(StudentServiceImpl.class);
        logger.info("这是service打印的列表数据:",studentList);
        return studentList;
    }
}
